<script>
import Vue from "vue";

export default Vue.extend({
    template: '<img style="display:block;height:100%;margin:auto;" :src="imgForMood" />',
    data() {
        return {
            hetHom: '',
            imgForMood: null
        }
    },
    methods: {
        refresh(params) {
            this.params = params;
            this.setMood(params);
        },
        setMood(params) {
            this.hetHom = params.value;
            if(this.hetHom == "het"){
                this.imgForMood="/static/icon/icon.png";
            }else if(this.hetHom == "hom"){
                this.imgForMood = "/static/icon/icon3.png";
            }else if(this.hetHom == "AA"){
                this.imgForMood = "/static/icon/icon2.png";
            }
        }
    },
    created() {
        this.setMood(this.params);
    }
})
</script>